Scenario #2011: Create Addition Debitor For Partner

UseCase Create Self Debitor For Partner => Debitor: D-3101001 - Test AG - additional debitor

Given Properties

name value
partnerPersonTradeName Test AG
billingContactCaption Test AG - billing department
billingContactEmailAddress billing@test-ag.example.org
debitorNumberSuffix 01
billable true
vatId VAT123456
vatCountryCode DE
vatBusiness true
vatReverseCharge false
defaultPrefix tsx

partnerPersonUuid

GET /api/hs/office/relations?relationType=PARTNER&personData=Test+AG
=> status: 200 OK 
[ {
  "uuid" : "a4914399-27dc-4094-bf76-d6230d4f8373", // partnerRelationUuid
  "anchor" : {
    "uuid" : "c6575205-1480-4b70-a30b-d0c5a1d7cc99", // Person: Hostsharing eG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Hostsharing eG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "f8f6ad7e-53d2-4cf0-9cb9-30ca2767c599", // partnerPersonUuid
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Test AG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "type" : "PARTNER",
  "mark" : null,
  "contact" : {
    "uuid" : "22c8432b-6fc1-44b4-a977-e1d00327b323", // Contact: Test AG - China
    "caption" : "Test AG - China",
    "postalAddress" : {
      "city" : "Dongguan City",
      "firm" : "Test AG",
      "name" : "Fi Zhong-Kha",
      "street" : "No.2 Commercial Second Street",
      "country" : "China",
      "building" : "Thi Chi Koh Building",
      "district" : "Niushan Wei Wu",
      "province" : "Guangdong Province"
    },
    "emailAddresses" : {
      "main" : "norden@test-ag.example.org"
    },
    "phoneNumbers" : {
      "phone" : "++15 999 654321"
    }
  }
} ]

In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one.

BankAccount: Test AG - refund bank account

POST /api/hs/office/bankaccounts
{
  "holder" : "Test AG - refund bank account",
  "iban" : "DE88100900001234567892",
  "bic" : "BEVODEBB"
}
=> status: 201 CREATED 6c98c562-a927-4545-9b5c-42b4f6a76fbf

Contact: Test AG - billing department

POST /api/hs/office/contacts
{
  "caption" : "Test AG - billing department",
  "emailAddresses" : {
    "main" : "billing@test-ag.example.org"
  }
}
=> status: 201 CREATED 58bd46c5-8709-4569-a4e0-68d4d44d58a7

Create Debitor: D-3101001 - Test AG - additional debitor

POST /api/hs/office/debitors
{
  "debitorRel" : {
    "anchor.uuid" : "f8f6ad7e-53d2-4cf0-9cb9-30ca2767c599", // partnerPersonUuid
    "holder.uuid" : "f8f6ad7e-53d2-4cf0-9cb9-30ca2767c599", // partnerPersonUuid
    "contact.uuid" : "58bd46c5-8709-4569-a4e0-68d4d44d58a7" // Contact: Test AG - billing department
  },
  "debitorNumberSuffix" : "01",
  "billable" : true,
  "vatId" : "VAT123456",
  "vatCountryCode" : "DE",
  "vatBusiness" : true,
  "vatReverseCharge" : false,
  "refundBankAccount.uuid" : "6c98c562-a927-4545-9b5c-42b4f6a76fbf", // BankAccount: Test AG - refund bank account
  "defaultPrefix" : "tsx"
}
=> status: 201 CREATED c1b0cfdc-d6b2-40eb-9afc-80df4c8fd111

generated on 03-10-2025 12:07:41 for branch master